<%@page import="org.apache.struts2.views.jsp.IfTag"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Collection"%>
<%@page import="DAO.TesinaDAO"%>
<%@page import="DAO.FactoryDAO"%>
<%@page import="modelo.Tesina"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>



<%
	Collection<Tesina> collTesis = new ArrayList<Tesina>();
	TesinaDAO tesinaDAO = FactoryDAO.getTesinaDAO();
	collTesis = tesinaDAO.buscarTesisPorPalabraClave((String) session
			.getAttribute("palabraClave"));
	int cant = collTesis.size();
	Iterator<Tesina> Itesinas = collTesis.iterator();
	if(cant != 0){
		%>
			<table class="tabla">
		<%		for (int i = 0; i < collTesis.size(); i++) {
			%><tr>
		<%
			for (int k = 0; k < 3; k++) {
					if (cant > 0) {
						if (Itesinas.hasNext()) {
							Tesina tesina = (Tesina) Itesinas.next();
		%>
			<td><s:url id="IdTesina" namespace="/"
					action="cargarVerTesinaFront">
					<s:param name="id_tesis"><%=tesina.getId()%></s:param>
				</s:url> <sj:div id="column1" cssClass="column">
						<div
						class="ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
						<div class="ui-widget-header ui-corner-all">
							<span class="title"><s:a href="%{IdTesina}">
									<%=tesina.getTitulo()%>
								</s:a> </span>
						</div>
						<div class="portlet-content" style="overflow: auto; height: 100px">
							<%=tesina.getResumen()%>
						</div>
					</div>
				</sj:div>
			</td>
					<%
						cant--;

									}
								}
							}
						}
					%>
			</tr>

		</table>
	<%}else{%>
		<div style="position: relative;top: 20px; color: red;font-size: 20px; font-style: verdana; font: bold;">
			<s:property value="getText('global.table.noResult')" />
	</div>
	<% } %>